# Define source file lists to SRC_LIST
SRC_LIST = media\video\src\mp4_player.c \
           media\metatag\src\ape_parser.c \
           media\metatag\src\id3_v1_parser.c \
           media\metatag\src\id3_v2_parser.c \
           media\metatag\src\meta_tag_api.c \
           media\metatag\src\meta_tag_parser.c \
           media\metatag\src\lyrics_parser.c \
           media\metatag\src\kuro_lrc_parser.c \
           media\audio\src\aud_api.c \
           media\audio\src\aud_main.c \
           media\audio\src\aud_audio.c \
           media\audio\src\aud_speech.c \
           media\audio\src\aud_keytone.c \
           media\audio\src\aud_tone.c \
           media\audio\src\aud_melody.c \
           media\audio\src\aud_ilm.c \
           media\audio\src\aud_utility.c \
           media\audio\src\aud_media.c \
           media\audio\src\aud_fmradio.c \
           media\audio\src\aud_post_process.c \
           media\audio\src\aud_id3_parser.c \
           media\audio\src\aud_daf_parser.c \
           media\audio\src\aud_player_media.c \
           media\audio\src\aud_player_mma.c \
           media\camera\src\ext_camera.c \
           media\camera\src\isp_if.c \
           media\camera\src\camera_process.c \
           media\camera\src\ae.c \
           media\camera\src\awb.c \
           media\camera\src\isp_cct_if.c \
           media\camera\src\isp_device_if.c \
           media\camera\src\isp_qc_if.c \
           media\camera\src\isp_comm.c \
           media\camera\src\af.c \
           media\camera\src\isp_yuv_if.c \
           media\camera\src\isp_engmode.c \
           media\camera\src\isp_flashlight.c \
           media\camera\src\camera_profiling_process.c \
           media\camera_v2\src\camera_process_v2.c \
           media\camera_v2\src\camera_webcam_v2.c \
           media\camera_v2\src\isp_isr_v2.c \
           media\camera_v2\src\isp_raw_if_v2.c \
           media\camera_v2\src\isp_yuv_if_v2.c \
           media\camera_v2\src\isp_comm_v2.c \
           media\camera_v2\src\isp_custom_comm_v2.c \
           media\camera_v2\src\isp_flashlight_v2.c \
           media\camera_v2\src\isp_image_effect_v2.c \
           media\camera_v2\src\aaa_process_v2.c \
           media\camera_v2\src\aaa_ae_v2.c \
           media\camera_v2\src\aaa_ae_comm_v2.c \
           media\camera_v2\src\aaa_ae_cct_if_v2.c \
           media\camera_v2\src\aaa_af_v2.c \
           media\camera_v2\src\aaa_af_comm_v2.c \
           media\camera_v2\src\aaa_awb_v2.c \
           media\camera_v2\src\isp_pca_v2.c \
           media\camera_v2\src\isp_cct_if_v2.c \
           media\camera_v2\src\isp_device_if_v2.c \
           media\camera_v2\src\isp_qc_if_v2.c \
           media\camera_v2\src\isp_engmode_v2.c \
           media\camera_v2\src\aaa_flash_ae_v2.c \
           media\camera_v2\src\camera_raw_process_v2.c \
           media\camera_v2\src\camera_yuv_process_v2.c \
           media\camera_v2\src\camera_post_process_v2.c \
           media\camera_v2\src\camera_raw_webcam_v2.c \
           media\camera_v2\src\camera_yuv_webcam_v2.c \
           media\camera_v2\src\isp_mshutter_v2.c \
           media\camera_v2\src\camera_profiling_process_v2.c \
           media\camera_v2\src\sensor_hw_if_v2.c \
           Media\common\src\visualhisr.c \
           Media\common\src\visual_comm.c \
           Media\common\src\bytestream_hw.c \
           Media\common\src\crc32.c \
           media\common\src\med_main.c \
           media\common\src\med_utility.c \
           media\common\src\fsal.c \
           media\common\src\fsal_buffer.c \
           media\common\src\fsal_read.c \
           media\common\src\fsal_write.c \
           media\image\src\img_main.c \
           media\image\src\img_api.c \
           media\image\src\img_msg_handler.c \
           media\image\src\img_ilm.c \
           media\common\src\med_int_smalloc.c \
           media\common\src\med_ext_smalloc.c \
           media\common\src\med_c_main.c \
           media\camera\src\cam_hp_msg_handler.c \
           media\camera\src\cam_hp_ilm.c \
           media\bcr\src\penpower_bcr_engine.c \
           media\video\src\vid_main.c \
           media\video\src\vid_api.c \
           media\video\src\vid_msg_handler.c \
           media\video\src\vid_msg_handler_mjpg.c \
           media\video\src\vid_msg_handler_modis.c \
           media\video\src\vid_ilm.c \
           media\common\src\med_v_main.c \
           media\video\src\vis_msg_handler.c \
           media\video\src\vis_ilm.c \
           media\video\src\media_session.c \
           media\video\src\media_player.c
#           
# video
#
ifneq ($(filter __VIDEO_ARCHI_V2__, $(strip $(MODULE_DEFS))),)
SRC_LIST += media\video_v2\common\src\vcodec_v2_main.c \
            media\video_v2\common\src\vfile_main.c \
            media\video_v2\common\src\video_buffer_management_v2.c \
            media\video_v2\common\src\video_comm_component_v2.c \
            media\video_v2\common\src\video_comm_v2.c \
            media\video_v2\common\src\video_dbg_v2.c \
            media\video_v2\common\src\video_codec_custom_setting_v2.c \
            media\video_v2\vt_parser\src\video_vt_api_v2.c \
            media\video_v2\common\src\video_filewriter_component_v2.c \
            media\video_v2\common\src\mp4_filewriter_buffer_management_v2.c \
            media\video_v2\common\src\mp4_filewriter_meta_creation_v2.c \
            media\video_v2\common\src\mp4_filewriter_component_v2.c \
            media\video_v2\common\src\video_recorder_clock_component_v2.c \
            media\video_v2\common\src\video_recorder_if_v2.c
endif

ifneq ($(filter __VIDEO_ARCHI_V1__, $(strip $(MODULE_DEFS))),)
SRC_LIST += media\video\common\src\video_comm.c \
            media\video\common\src\video_comm_dsp.c \
            media\video\common\src\video_comm_idp_if.c \
            media\video\common\src\video_comm_memory_manager.c \
            media\video\common\src\video_comm_statistic.c \
            media\video\common\src\video_dec_api.c \
            media\video\common\src\video_dec_buffer_manager.c \
            media\video\common\src\video_dec_fileparse_adap.c \
            media\video\common\src\video_dec_isr.c \
            media\video\common\src\video_editor.c \
            media\video\common\src\video_editor_idp_if.c \
            media\video\common\src\video_editor_buffer_manager.c \
            media\video\common\src\video_editor_timectrl.c \
            media\video\common\src\video_recorder_api.c \
            media\video\common\src\video_recorder_buffer_manager.c \
            media\video\common\src\video_recorder_file_creator.c \
            media\video\common\src\video_recorder_isr.c \
            media\video\common\src\video_stream_if.c \
            media\video\common\src\video_stream_rtp_reorder_buffer.c \
            media\video\common\src\video_call_buffer.c \
            media\video\common\src\video_call_if.c \
            media\video\common\src\video_call_isr.c \
            media\video\mp4\src\mp4_dec_frame_buffer_manager.c \
            media\video\mp4\src\mp4_dec_isr.c \
            media\video\mp4\src\mp4_enc_isr.c \
            media\video\mp4\src\mp4_rtp.c \
            media\video\mp4\src\h263_rtp.c \
            media\video\mp4\src\mp4_videocall.c \
            media\video\h264\src\h264_dec_dpb_manager.c \
            media\video\h264\src\h264_dec_isr.c \
            media\video\h264\src\h264_rtp.c \
            media\video\h264\src\h264_rtp_interleaved_buffer.c \
            media\video\sw_video\src\sw_video_dec_yuv_buffer.c \
            media\video\sw_video\src\sw_video_dec_frame_info.c \
            media\video\sw_video\src\sw_video_dec_isr.c \
            media\video\sw_video\src\sw_video_enc_input_buffer_if.c
endif

SRC_LIST += media\common\src\med_ilm.c \
            media\common\src\med_api.c \
            media\camera\src\usbvideo_cam_if.c \
            media\vcodec\src\vcodec_main.c \
            media\codec\src\H264SwDecCustomize.c \
            media\codec\src\RVSwDecCustomize.c \
            media\codec\src\MP4SwDecCustomize.c

#
# Audio
#
ifneq ($(filter __ATV_SUPPORT__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_atv.c
endif

ifneq ($(filter __BT_A2DP_PROFILE__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_bt_a2dp.c
endif

ifneq ($(filter __BT_HFG_PROFILE__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_bt_hfp.c
endif

ifneq ($(filter __BT_A2DP_PROFILE__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_bt_main.c
else
  ifneq ($(filter __BT_HFG_PROFILE__, $(strip $(MODULE_DEFS))),)
    SRC_LIST += media\audio\src\aud_bt_main.c
  endif
endif

ifeq ($(filter MED_V_NOT_PRESENT, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_build_cache.c
endif

ifneq ($(filter __CTM_SUPPORT__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_ctm.c
endif

# Rich audio profile
ifeq ($(filter MT6223 MT6251, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_input_stream.c
endif

ifneq ($(filter DSP_WT_SYN, $(strip $(MODULE_DEFS))),)
  ifeq ($(filter NEPTUNE_MMI, $(strip $(MODULE_DEFS))),)
    SRC_LIST += media\audio\src\aud_mma.c
  endif
endif

ifneq ($(filter PURE_AUDIO_SUPPORT, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_player_mp4.c
endif

ifneq ($(filter __RM_DEC_SUPPORT__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_player_rm.c
endif

ifneq ($(filter AUD_REC_ENABLE, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_record.c \
              media\audio\src\aud_recorder_media.c
endif

ifneq ($(filter BGSND_ENABLE, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_snd.c
endif

ifneq ($(filter __GENERAL_TTS__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_tts.c
endif

ifneq ($(filter VM_SUPPORT, $(strip $(MODULE_DEFS))),)
  ifneq ($(filter VM_LOG, $(strip $(MODULE_DEFS))),)
    SRC_LIST += media\audio\src\aud_vm.c
  endif
endif

ifneq ($(filter VR_ENABLE, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_vr_main.c \
              media\audio\src\aud_vr_sd.c
endif

ifneq ($(filter VRSI_ENABLE, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\audio\src\aud_vrsi_main.c \
              media\audio\src\aud_vr_si.c
endif


#
# MJPEG Decode
#
ifneq ($(filter MJPG_DECODE, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\video\src\mjpg_player.c \
              media\video\src\vid_avi.c
endif

#
# MP4 Parser
#
ifneq ($(filter __M3GPMP4_FILE_FORMAT_SUPPORT__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\common\src\mp4_parser.c \
              media\common\src\mp4_parser_audio.c \
              media\common\src\mp4_parser_audio_utility.c \
              media\common\src\mp4_parser_file.c \
              media\common\src\mp4_parser_stbl.c \
              media\common\src\mp4_parser_udat.c \
              media\common\src\mp4_parser_video.c \
              media\common\src\mp4_producer_audio.c \
              media\common\src\mp4_sample_data_audio.c
endif

#
# Bitstream
#
ifneq ($(filter __BITSTREAM_API_SUPPORT__, $(strip $(MODULE_DEFS))),)
  SRC_LIST += media\bitstream\src\bitstream_ilm.c \
              media\bitstream\src\bitstream_main.c \
              media\bitstream\src\bitstream_audio.c \
              media\bitstream\src\bitstream_record.c
  ifneq ($(filter __BITSTREAM_VIDEO_API_SUPPORT__, $(strip $(MODULE_DEFS))),)
    ifeq ($(filter __VIDEO_ARCHI_V2__, $(strip $(MODULE_DEFS))),)
      SRC_LIST += media\bitstream\src\bitstream_video.c \
                  media\bitstream\src\bitstream_video_ilm.c \
                  media\bitstream\src\bitstream_video_msg_hdlr.c
    endif
  endif
endif

ifneq ($(filter ISP_SUPPORT,$(strip $(MODULE_DEFS))),)
SRC_LIST += media\camera\src\cam_main.c \
            media\camera\src\cam_api.c \
            media\camera\src\cam_msg_handler.c \
            media\camera\src\cam_ilm.c \
            media\camera\src\cam_v_msg_handler.c \
            media\camera\src\cam_v_ilm.c \
            media\camera\src\cam_v_main.c
else
ifneq ($(filter __DIRECT_SENSOR_SUPPORT__,$(strip $(MODULE_DEFS))),)
SRC_LIST += media\camera\src\cam_main.c \
            media\camera\src\cam_api.c \
            media\camera\src\cam_msg_handler.c \
            media\camera\src\cam_ilm.c \
            media\camera\src\cam_v_msg_handler.c \
            media\camera\src\cam_v_ilm.c \
            media\camera\src\cam_v_main.c
endif
endif

ifneq ($(filter WEBCAM_SUPPORT,$(strip $(MODULE_DEFS))),)
SRC_LIST += media\webcam\src\webcam_main.c \
            media\webcam\src\webcam_msg_handler.c \
            media\webcam\src\webcam_ilm.c \
            media\webcam\src\webcam_api.c
endif

ifneq ($(filter TV_OUT_SUPPORT,$(strip $(MODULE_DEFS))),)
SRC_LIST += media\tvout\src\tvo_main.c \
            media\tvout\src\tvo_msg_handler.c \
            media\tvout\src\tvo_api.c \
            media\tvout\src\tvo_ilm.c
endif                                  
ifneq ($(filter __MEDIA_VT__,$(strip $(MODULE_DEFS))),)
SRC_LIST += media\vcall\src\vcall_ilm.c \
            media\vcall\src\vcall_main.c \
            media\vcall\src\vcall_msg_hdlr.c \
            media\vcall\src\vcall.c 
endif        
 
#  Define include path lists to INC_DIR
INC_DIR = drv\include \
          drv\idp\include \
          drv\drv_sec\include\idp\mt6253\ \
          drv\graphics\include \
          drv\graphics\jpeg_codec\inc \
          drv\graphics\common\inc \
          media\bcr\include \
          media\common\include \
          media\audio\include \
          media\video_v2\common\include \
          media\video_v2\decoder\include \
          media\video_v2\vt_parser\include \
          media\video\include \
          media\video\common\include \
          media\video\mp4\include \
          media\video\h264\include \
          media\video\sw_video\include \
          media\camera_v2\include \
          media\camera\include \
          media\image\include \
          media\webcam\include \
          media\tvout\include \
          media\mtv\include \
          media\vcodec\include \
          image_codec\common\include \
          image_codec\sw_jpeg_codec\include \
          l1audio \
          l1audio\inc \
          drm\include \
          plutommi\mtkapp\mtkappinc \
          plutommi\mtkapp\gdi\gdiinc \
          plutommi\mmi\inc \
          media\rtp\inc \
          media\stream\include \
          applib\inet\engine\include \
          sst\include \
          applib\misc\include \
          ps\l4\uem\include \
          ps\crypto\sb51\husw\src\huswadap\include \
          ps\crypto\sb51\husw\src\common\include \
          ps\crypto\sb51\husw\src\aes\include \
          ps\crypto\sb51\husw\src\huapi\include \
          ps\crypto\sb51\husw\src\rng\include \
          ps\crypto\sb51\husw\src\sha1\include \
          ps\crypto\sb51\husw\src\huctx\include \
          ps\crypto\sb51\husw\src\eca\include \
          ps\crypto\sb51\husw\src\ff\include \
          ps\crypto\sb51\husw\src\zmod\include \
          ps\crypto\sb51\husw\src\huxapi\include \
          ps\crypto\sb51\husw\src\huutil\include \
          ps\crypto\sb51\husw\src\seed\include \
          ps\crypto\sb51\husw\src\hudefaultmem\include \
          media\vcall\include \
          media\metatag\include \
          3g324m\appl\inc \
          3g324m\interface\inc \
          drv\idp\include\legacy \
          drv\idp\include\legacy\idp_hw \
          drv\drv_sec\include\idp\mt6235 \
          image_codec\sw_jpeg_codec\include \
          interface\hwdrv \
          media\bitstream\include \
          drv\graphics\g2d\inc \
          vendor\player\ipeer\inc \
          btstacka\inc \
          btadp\include \
          media\codec\include \
          matv\inc \
          media\media_sec\sw_rv9_dec\RV9_src_comm \
          image_codec\sw_rotator\inc
 
# Define the specified compile options to COMP_DEFS
COMP_DEFS = VM_SUPPORT \
            __ID3_INFO_ENABLE__ \
            MMA_AMR_SUPPORT \
            MMI_ON_HARDWARE_P
 
# Define the source file search paths to SRC_PATH
SRC_PATH = media\bcr\src \
          media\common\src \
          media\audio\src \
          media\bitstream\src \
          media\video_v2\common\src \
          media\video_v2\vt_parser\src \
          media\video\src \
          media\video\common\src \
          media\video\mp4\src \
          media\video\h264\src \
          media\video\sw_video\src \
          media\camera\src \
          media\camera_v2\src \
          media\image\src \
          media\webcam\src \
          media\tvout\src \
          media\rtp\src\ \
          media\stream\src\ \
          media\vcall\src \
          media\vcodec\src \
          media\metatag\src \
          media\codec\src
 
ifneq ($(filter __MMI_DSM_NEW__ , $(strip $(MODULE_DEFS))),)                  
	INC_DIR += plutommi\mmi\mythroad\mythroadinc
endif
